﻿using System;
using System.Linq;

class IncreasingSequence
{
    static void Main(string[] args)
    {
        int[] arr = { 3, 2, 3, 4, 2, 2, 4 };
        int index = 0;
        int length = 0;
        int count = 1;
        int maxCount = 0;
        for (int i = 1; i < arr.Length; i++)
        {
            if (arr[i] == arr[i - 1] + 1)
            {
                count++;
                if (maxCount < count)
                {
                    maxCount = count;
                    index = i;
                }
                length = maxCount;
            }
            else
            {
                count = 1;
            }
        }
        Console.Write("{");
        for (int i = index - length + 1; i < index; i++)
        {
            Console.Write("{0}", arr[i]);
        }
        Console.Write("{0}", arr[index]);
        Console.Write("}");
        Console.WriteLine();
    }
}
